<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        canvas {
            width: 200px;
            height: 100px;
            border: solid 1px red;
        }
    </style>
</head>
<body>
    <canvas>

    </canvas>
    <script>
        const canvas=document.querySelector("canvas")
       const ctx= canvas.getContext("2d")
       ctx .beginPath();
       ctx.strokeStyle="red"
        ctx.moveTo(10,10)
        ctx.lineTo(100,10);
        ctx.stroke();
        ctx .beginPath();
       ctx.strokeStyle="blue"
        ctx.moveTo(10,30)
        ctx.lineTo(100,30)
        ctx.stroke();
    </script>
</body>
</html>